<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePricesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prices', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 100)->index();
            $table->string('title', 100)->nullable();
            $table->string('subtitle', 100)->nullable();
            $table->string('short_desc', 100)->nullable();
            $table->decimal('prices', 20,2)->nullable();
            $table->integer('pmtag_id')->nullable();
            $table->integer('metering_period_id')->nullable();
            $table->timestamp('startdate')->nullable();
            $table->timestamp('enddate')->nullable();
            $table->tinyInteger('type')->nullable();
            $table->string('status')->default('forSale');
            $table->integer('expiry_date_id')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
